Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #71: Group #265

Merged
merged 584 commits into from
May 18, 2023
Merged

Issue #71: Group #265

merged 584 commits into from
May 18, 2023

Conversation

streetycat
Copy link
Collaborator

No description provided.

liqirun and others added 30 commits March 14, 2023 17:01
…ll Command timeout to 15 mins, remove app-manager`s intermediate state`s timeout
…cannot trigger the device-config updating's bug in some cases
@@ -10,6 +10,49 @@ message StorageBodyContent {
bytes value = 1;
}

// ObjectShellObject
message ObjectShellDescContent {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's about: #219

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I have commit it with the feature #71 .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a corresponding English readme

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll translate it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the group mechanism has not designed a proper acl?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No acl now. and it need a new discussion.

handler.clone(),
));

server.at("group/push-proposal").put(Self::new(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be "/group/push-proposal"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The http protocol of rcp is recommended to use RESTFUL, not to have actions on the path, but to use method to identify, so the two paths of group will be better designed as the following

POST /group/service
POST /group/proposal

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, I will update it.

@@ -127,6 +127,40 @@ impl DeviceInfoManagerImpl {
}
}

async fn verfiy_group_own_signs(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The so-called "checksign" looks like it's just comparing hash values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will rename it.

}
}

async fn put_object(&self, dec_id: &ObjectId, obj: NONObjectInfo) -> BuckyResult<()> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use sync_std::future::timeout instead of relying on the select of futures, which is obviously more complicated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to hold the life of the future to continue. and start a new future to retry at the same time. maybe the first future is slow only.

rpath: rpath.to_string(),
};

self.encode_common_headers(NONAction::PutObject, &req_common, &mut http_req);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For group services NONAction field are not unnecessary and can be removed

@lurenpluto lurenpluto added the Architecture Core architecture of project label May 16, 2023
@lurenpluto lurenpluto added this to the Group-supported Release milestone May 16, 2023
@lurenpluto lurenpluto added Group Group Object related cyfs-base Functions and components in cyfs-base project labels May 16, 2023
@lurenpluto lurenpluto self-requested a review May 16, 2023 07:16
com_req.req_path.as_deref(),
);

http_req.insert_header(CYFS_API_LEVEL, com_req.level.to_string());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api level is non/ndn relatively obsolete design, for the group this function this should not be necessary

}

pub(crate) fn make_default_common(dec_id: ObjectId) -> NONOutputRequestCommon {
NONOutputRequestCommon {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is recommended that group-related interfaces have a separate RequestCommon, even if it is completely consistent with NON's, it is better to redefine it

pub type GroupRequestCommon = NONRequestCommon;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, you are right, I will define a new structure, the usefull field is only dec_id now. others will be add when it's used.

@lurenpluto lurenpluto self-requested a review May 17, 2023 08:20
@lurenpluto lurenpluto merged commit e5e8b3a into buckyos:main May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Core architecture of project cyfs-base Functions and components in cyfs-base project Group Group Object related
Projects
Status: 🧪To Test
Development

Successfully merging this pull request may close these issues.

5 participants